<template>
  <!-- 搜索建议列表 -->
  <div class="sugg-list">
    <div class="sugg-item" v-html="lightFn(menu, kw)">{{ menu }}</div>
  </div>
</template>

<script>
import { lightFn } from '@/utils/str.js'
export default {
  props: ['menu', 'kw'],
  methods: {
    lightFn
  }
}
</script>

<style lang="less" scoped>
/*搜索建议列表样式 */
.sugg-list {
  .sugg-item {
    padding: 0 15px;
    border-bottom: 1px solid #e9e8e8;
    font-size: 14px;
    line-height: 50px;
    // 实现省略号的三行代码
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
</style>
